#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "AbstractGauge.h"
#include "Gauge.h"
#include "InfoBus.h"
#include "Controller.h"

#include <QAction>
#include <QIcon>

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

protected:
    void createActions();
    void fetchProc();
    void setWindowTitleMode();
protected slots:
    void startGauge();
    void startAbstrGauge();
    void startCtrl();
    void exitPrg();
    void sendDummyTrace();
    void expandEvents();
    void showTrace();
    void expandActions();
    void uploadMetadata();
    void fetchLog();
    void clickedLog();
    void sendMetadata();
    void clickClearLog();
    void clickDeleteQueue();
    void clickDeleteMetadata();
    void clickDeleteEvtScheme();
    void clickDeleteRegistry();
    void clickComponentsList();
    void clickStartAllComponents();
    void clickPromoteToMaster();
private:
    long m_lLogId;
    Ui::MainWindow *ui;
    AbstractGauge * pAbstrGauge, * pAbstrGauge2, * pAbstrGauge3, * pAbstrGauge4;
    Gauge * pGauge, * pGauge2, * pGauge3, * pGauge4;
    Controller * pController;

    QAction * pActionControllerMaster;
    QAction * pActionAllCompenents;
    QAction * pActionComponentList;
    QAction * pActionDelComponentRegistry;
    QAction * pActionDelMetadata;
    QAction * pActionDelEvtScheme;
    QAction * pActionDelAllMsg;
    QAction * pActionClearLog;
    QAction * pActionStartGauge;
    QAction * pActionStartAbstrGauge;
    QAction * pActionExit;
    QAction * pActionSendDummyTrace;
    QAction * pActionExpandEvents;
    QAction * pActionStartCtrl;
    QAction * pActionShowTrace;
    QAction * pActionExpandActions;
    QAction * pActionUploadMetadata;
    QAction * pActionFetchLog;
    QAction * pActionSep;

    Dispatcher * m_pBusSend, * m_pSendMeta;
    IListener * m_pBusListen;
    IListener * m_pBusAbstrListen;
};

#endif // MAINWINDOW_H
